import { defineStore } from 'pinia'

export const useStore = defineStore({
  id: 'useStore',
  state: () => ({
    menu: ''
  }),
  getters: {
    // menuGet (state: any) {
    //     return state.menu
    // }
  },
  actions: {
    menuActive (menu: any) {
      this.menu = menu
    }
  },
  // 使用该插件，开启数据缓存
  persist: {
    enabled: true,
    strategies: [
        {
            storage: localStorage,
        }
    ]
  }
})